<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <style>

    </style>
</head>

<body>
    <div id="app">
        <child>
            <!-- 子组件标签内部这里放进来 -->
            <button>按钮</button>
        </child>
    </div>
</body>

<template id="tmpl">
    <div>
        <h1>标题</h1>
        <!-- 弄个坑 ，想放什么就放什么 -->
        <slot></slot>
    </div>
</template>

<script>
    let child = {
        template: '#tmpl'
    }
    var vm = new Vue({
        el: '#app',
        data: {},
        components: {
            child
        }
    })
</script>

</html>